package project

import (
	"context"
	"gf-assistant/internal/common/factory"
	"gf-assistant/internal/project/parameter"
)

type MemberController struct{ service string }

var Member = MemberController{service: "project.MemberService"}

func GetMemberService() *MemberService {
	return factory.Get(Member.service).(*MemberService)
}
func (c *MemberController) ListMember(ctx context.Context, req *parameter.ListMemberReq) (res *parameter.ListMemberRes, err error) {
	return GetMemberService().ListMember(ctx, req), nil
}
func (c *MemberController) ListPosition(ctx context.Context, req *parameter.ListPositionReq) (res *parameter.ListPositionRes, err error) {
	return GetMemberService().ListPosition(ctx, req), nil
}
func (c *MemberController) ListMemberSelected(ctx context.Context, req *parameter.ListMemberSelectedReq) (res *parameter.ListMemberSelectedRes, err error) {
	return GetMemberService().ListMemberSelected(ctx, req), nil
}
func (c *MemberController) CreateMember(ctx context.Context, req *parameter.CreateMemberReq) (res *parameter.CreateMemberRes, err error) {
	return GetMemberService().CreateMember(ctx, req), nil
}
func (c *MemberController) DeleteMember(ctx context.Context, req *parameter.DeleteMemberReq) (res *parameter.DeleteMemberRes, err error) {
	return GetMemberService().DeleteMember(ctx, req), nil
}
func (c *MemberController) GetMemberCombox(ctx context.Context, req *parameter.GetMemberComboxReq) (res *parameter.GetMemberComboxRes, err error) {
	return GetMemberService().GetMemberCombox(ctx, req), nil
}
